import Vue from 'vue'
import Router from 'vue-router'
import about from '../components/about'
import my from '../components/my'
import home from '../components/home'
import cart from '../components/cart'
import login from '../page/login'
import fzf from '../components/fzf'
import list from '../page/add/list'
import addchild from '../page/add/addchild'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/about',
      name: 'about',
      component: about
    },
    {
      path: '/my',
      name: 'my',
      component: my
    },
    {
      path: '/',
      name: 'home',
      component: home
    },
    {
      path: '/cart',
      name: 'cart',
      component: cart
    },
    {
      path: '/login',
      name: 'login',
      meta: {
        keepAlive: true
      },
      component: login
    },
    {
      path: '/list',
      name: 'list',
      component: list
    },
    {
      path: '/addchild',
      name: 'addchild',
      component: addchild
    },
    {
      path: '*',
      name: '*',
      component: fzf
    }
    // {
    //   path: '*',
    //   name: '*',
    //   component: resolve => System.import('../components/fzf')
    // }
  ]
})
